package com.bw.ppjokeplay.adapter

import com.bumptech.glide.Glide
import com.bw.ppjokeplay.R
import com.bw.ppjokeplay.mvvm.model.entity.CommentsData
import com.bw.ppjokeplay.mvvm.model.entity.CommentsEntity
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

/**
 * @author Lishaohe
 * @description:
 * @date :2021/11/11 0011 下午 7:27
 *
 */
class CommentsAdapter: BaseQuickAdapter<CommentsData, BaseViewHolder>(R.layout.item_comments) {
    override fun convert(holder: BaseViewHolder, item: CommentsData) {
        Glide.with(context).load(item.author!!.avatar).circleCrop().into(holder.getView(R.id.avatar))
        holder.setText(R.id.user_name,item.author!!.name)
        holder.setText(R.id.comment,item.commentText)
    }

}